﻿@using ES.Models
@model UserCardInfo
@{Html.RenderPartial("ProductDetail", Model.Product);}
@{
    var currentCustomer = (Customer)Session["loginkey"];
}
<div class="saleForm">
    @using (Html.BeginForm())
    {
        var yearList = new List<int>();
        var monthList = new List<int>();
        for (var i = 1; i <= 12; i++) { monthList.Add(i); }
        for (var i = 12; i <= 30; i++) { yearList.Add(i); }
        @Html.HiddenFor(d => d.Product.Id)
        <div>
            @Html.Label("Kart Numarası")
            @Html.TextBoxFor(d => d.CardNumber)
            @Html.ValidationMessageFor(d => d.CardNumber)</div>
        <div>
            @Html.Label("Cv2 No")
            @Html.TextBox("SecurityNumber")</div>
        <div>
            @Html.Label("Kart Sahibi Ad Soyad")
            @Html.TextBox("CardHasName")</div>
        <div>
            @Html.Label("Son kullanma Ay")
            @Html.DropDownList("ExpMonth", new SelectList(monthList))</div>
        <div>
            @Html.Label("Son kullanma yıl")
            @Html.DropDownList("ExpYear", new SelectList(yearList))</div>
        <div>
            @Html.Label("Fatura Adresi")
            @Html.TextBox("BillAdress", currentCustomer.BillAdress)</div>
        <div>
            @Html.Label("Teslimat Adresi")
            @Html.TextBox("DeliveryAdress", currentCustomer.DeliveryAdress)</div>
        <input type="submit" value="Satışı Tamamla" />
    }</div>
